package com.cy.pj.sys.Impl;

import com.cy.pj.sys.dao.SysNoticeDaoTest;
import com.cy.pj.sys.pojo.SysNotice;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;

import java.sql.SQLException;
import java.util.List;


//@Repository
//@Qualifier("SysNoticeDao")
public class SynNoticeImpl1 implements SysNoticeDaoTest {

    @Autowired
    private SqlSession sqlSession;

    @Override
    public List<SysNotice> selectNotices(Long id) throws SQLException {
        String insertName = this.getClass().getInterfaces()[0].getName();
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        String statem = insertName+"."+methodName;
        List<SysNotice> list = sqlSession.selectList(statem,id);
        System.out.println("我被调用了");
        return list;
    }

    @Override
    public int insertNotice(SysNotice sysNotice) {
        return 0;
    }

    @Override
    public int updateNotice(SysNotice sysNotice) {
        return 0;
    }

    @Override
    public int deleteNoticeList(Long... ids) {
        return 0;
    }

    @Override
    public SysNotice selectAnno(long id) {
        return null;
    }

    @Override
    public List<SysNotice> selectWhere(SysNotice sysNotice) {
        return null;
    }
}
